print "set -x "
print "set -e "
print "IMG=c7puredocker.img"

MasterNum=3
SlaveNum=5

# DISK copy

for i in range(0,MasterNum+SlaveNum):
    si = str(i)
    print "cp ~/img/$IMG /var/lib/libvirt/images/mesos"+si+".img"

# Define Master

for i in range(0,MasterNum):
    si = str(i)
    print "virt-install -n mesos1 -r 512 --vcpus=1 " \
          "--disk /var/lib/libvirt/images/mesos"+si+".img,device=disk" \
          " --graphics vnc,port=591"+si+" --network=bridge:virbr0" \
          " --import --noautoconsole"


# Define Slave

for i in range(0,SlaveNum):
    i=i+MasterNum
    si = str(i)
    print "virt-install -n mesos1 -r 10240 --vcpus=4 " \
          "--disk /var/lib/libvirt/images/mesos"+si+".img,device=disk" \
          " --graphics vnc,port=591"+si+" --network=bridge:virbr0" \
          " --import --noautoconsole"




